package cn.dinkevin.xui.thread;

/**
 * 线程任务类
 * Created by ChengPengFei on 2017/3/22 0022.</br>
 * Copyright ©2017 juziwl, All Rights Reserved.
 * @param <P> 任务参数
 */

public abstract class ThreadTask<P> implements Runnable{

    private P params;

    /**
     * 构造器
     * @param params
     */
    public ThreadTask(P params){
        this.params = params;
    }

    /**
     * 方法执行体
     * @param params
     */
    public abstract void run(P params);

    @Override
    public void run() {
        run(params);
    }
}
